package com.mycode.composite09.resolve;

// 视频文件类：叶子节点
public class VideoFile extends AbstractFile{

    private String name;

    public VideoFile(String name) {
        this.name = name;
    }

    @Override
    public void test(AbstractFile file) {
        System.out.println("-----> " + name + " test method");
    }

    @Override
    public void add(AbstractFile file) {

    }

    @Override
    public void remove(AbstractFile file) {

    }

    @Override
    public AbstractFile getChild(int i) {
        return null;
    }

    @Override
    public void killVirus() {
        System.out.println("------ 对音频文件'" + name + "'进行杀毒！");
    }
}
